package com.ymatou.iapi.sellerproduct.service;

import java.util.HashMap;
import java.util.Map;

import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;

public class AddLiveProductCall extends YmatouAutoTestCall{
	private static String opurl ="/api/Product/AddLiveProduct";

	
	public AddLiveProductCall() {
		super(EnvSetup.getSystemUrl("sellerproduct_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public JSONObject addLiveProductWithLiveId(int sellerId,int liveId){
		
		Map<String, Object> updateMap = new HashMap<String,Object>();
		updateMap.put("Product->ActivityId", liveId);
		updateMap.put("UserId", sellerId);
		
		return callAndGetReturnData(updateMap);
	}
	
	
	public static void main(String[] args) {
		new AddLiveProductCall().addLiveProductWithLiveId(20336378,150984);
	}
	
}
